package 笔试.jd._2019;

import java.util.Arrays;
import java.util.Comparator;

/**
 * @author： YHSimon
 * @date： 2022-08-13 21:21
 */
public class Solution {

    public static void main(String[] args) {
        int n = 3;
        int[][] nums = new int[][]{
                {1, 4, 2}, {4, 3, 2}, {2, 5, 3}
        };
        int res = 0;
        Arrays.sort(nums, new Comparator<int[]>() {
            @Override
            public int compare(int[] o1, int[] o2) {
                if (o1[0] == o2[0]) {
                    if (o1[1] == o2[1]) {
                        return o1[2] - o2[2];
                    } else {
                        return o1[1] - o2[1];
                    }
                } else {
                    return o1[0] - o2[0];
                }
            }
        });
        for (int i = 0; i < n; i++) {
            int a = nums[i][0], b = nums[i][1], c = nums[i][2];
            for (int j = i + 1; j < n; j++) {
                if (nums[j][0] - a > 0 && nums[j][1] - b > 0 && nums[j][2] - c > 0) {
                    res++;
                    break;
                }
            }
        }
        System.out.println(res);
    }
}

